<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>审核日志</title>
    <link rel="stylesheet" href="/static/crm/lib/layui-v2.6.3/css/layui.css" media="all">
</head>

<body>
    <script src="/static/crm/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script type="text/html" id="toolbarDemo">

        <div class="layui-btn-container">
        </div>
    </script>
    <table class="layui-hide"  id="current" lay-filter="currentTableFilter">
    </table>
</body>

</html>
<script>
    layui.use(['form', 'table'], function () {
        var $ = layui.jquery,
            form = layui.form,
            table = layui.table;

        let userTable = table.render({
            elem: '#current',
            url: 'recycle',
            toolbar: '#toolbarDemo',
            defaultToolbar: ['filter', 'exports', 'print', {
                title: '提示',
                layEvent: 'LAYTABLE_TIPS',
                icon: 'layui-icon-tips'
            }],
            cols: [[
                { field: 'id', title: 'ID', sort: true, fixed: 'left' },
                { field: 'name', minWidth: '190', title: '审批人' },
                { field: 'name_id', minWidth: '110', title: '审批人id' },
                { field: 'idea', while: '80', title: '意见' },
                { field: 'audit_time', minWidth: '110', title: '审批时间', sort: true },
                { field: 'state', minWidth: '110', title: '审批状态', sort: true },
            ]],
            limits: [5, 10, 20, 25, 50, 100],
            limit: 5,
            page: true,
            skin: 'line',
            parseData: function (res) {
                var result;
                if (this.page.curr) {
                    result = res.data.slice(this.limit * (this.page.curr - 1), this.limit * this.page.curr);
                } else {
                    result = res.data.slice(0, this.limit);
                }
                return { 'code': res.code, 'msg': res.msg, 'count': res.total, 'data': result };
            },
        });
    });
</script>